define(['mCommon'], function (MCommon) {
    function User(params) {
        this.fields=[
            {name:'name',alias:'登录名'},
            {name:'password',alias:'密码'},
            {name:'trueName',alias:'姓名'},
            {name:'roleId',alias:'角色',type:'select',model:'mRole',optionsText:'name',optionsValue:'id'},
            {name:'roleName',alias:'角色名称'},
            {name:'departmentId',alias:'部门',type:'select',model:'mDepartment',optionsText:'name',optionsValue:'id'},
            {name:'departmentName',alias:'部门名称'},
            {name:'addr',alias:'地址'},
            {name:'tel',alias:'电话'},
            {name:'email',alias:'邮件'},
            {name:'logged',alias:'是否修改密码'},
            {name:'lastIP',alias:'最后登录IP'},
            {name:'lastTime',alias:'最后登录时间'},
            {name:'loginTimes',alias:'登陆次数'}
        ];
        this.proxy={url:'/users'}
        this.form ={add:'UserForm',view:'UserForm',edit:'UserEditForm'};
        this.callParent(params);
    }

    User.extend(MCommon);

    return User;
});
